#include <stdint.h>

using namespace std;

#ifdef __cplusplus
#define _EXPORT extern "C"  __attribute__((visibility("default")))
#else
#define _EXPORT extern __attribute__((visibility ("default")))
#endif


struct MT_STRICKLE_RECT{
	int x;
	int y;
	int w;
	int h;	
};
/*
参考需求说明书-刮板机算法参数表
*/
struct MT_STRICKLE_ALG_PARAM{
	uint32_t sys_sens1;
	uint32_t sys_sens2;
	float inital_angle;
	float width_lth;
	float width_hth;
    float height_lth;
	MT_STRICKLE_RECT rect;
	int downsample;
};

/*
刮板算法信息输出结构
*/
struct MT_STRICKLE_INFO{
	float angle;
	float width;
	float height; 
	bool lightfault;
	void* reserved;
};

/*
刮板算法结果输出结构
*/
struct MT_STRICKLE_RESULT{
	float angle;
	int status;
	void* reserved;
};

_EXPORT bool MT_Strickle_Alg_Init(MT_STRICKLE_ALG_PARAM initParam);

_EXPORT bool MT_Strickle_Alg_SetParams(MT_STRICKLE_ALG_PARAM initParam);

_EXPORT MT_STRICKLE_ALG_PARAM MT_Strickle_Alg_GetParams();

_EXPORT void MT_Strickle_Alg_GetFrameInfo(MT_STRICKLE_INFO* info, unsigned char *pstFrameInfo, int w, int h);

_EXPORT MT_STRICKLE_RESULT MT_Strickle_Alg_GetFrameResult(MT_STRICKLE_INFO FrameInfo);

_EXPORT bool MT_Strickle_Alg_GetTestImg(unsigned char* src, unsigned char** dst, int &outputNum, int &width, int &height);

_EXPORT bool MT_Strickle_Alg_ReleaseTestImg(unsigned char** dst);

_EXPORT bool MT_Strickle_Alg_Release();

